﻿using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;

public partial class admin_delclass : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        Function.CheckSession();
        if (System.Web.HttpContext.Current.Session["adminname"] == null)
            System.Web.HttpContext.Current.Response.Write("<script>alert('您的IP已经被记录，请不要尝试破坏网站，否则我们将采用法律手段进行追究...');location.href('/default.aspx');</script>");
        else
            if (Request["cid"] != null)
            {
                Class c = new Class();
                c.DelClass(int.Parse(Request["cid"].ToString()));
                Response.Write("<script>alert('删除成功');location.href('classlist.aspx');</script>");
            }
    }
}
